package com.smart.manager.finance.controller;

import cn.dev33.satoken.annotation.SaCheckPermission;
import com.smart.common.entities.ajax.AjaxResult;
import com.smart.common.entities.constant.SmartConstant;
import com.smart.common.entities.core.Page;
import com.smart.manager.finance.entities.bodys.ROrderPop;
import com.smart.manager.finance.entities.models.FinanceOrderPop;
import com.smart.manager.finance.repository.OrderPopRepository;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author Administrator
 */

@Api(tags = "充值订单管理")
@RestController
@RequestMapping(SmartConstant.MANAGER_API_PREFIX + "finance/order/pop")
@RequiredArgsConstructor
public class OrderPopApi {

    private final OrderPopRepository orderPopRepository;


    @GetMapping(value = "pageList")
    @ApiOperation(value = "查询充值订单")
    @SaCheckPermission("finance:order:pop:pageList")
    public AjaxResult<Page<FinanceOrderPop>> pageList(@Validated ROrderPop.SearchBody body) {
        Page<FinanceOrderPop> result = orderPopRepository.pageList(body);
        return AjaxResult.data(result);
    }


}
